package com.example.questionnaire.mbg.service.impl;

import com.example.questionnaire.mbg.entity.Want;
import com.example.questionnaire.mbg.mapper.WantMapper;
import com.example.questionnaire.mbg.service.IWantService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Primary
@Service
public class WantServiceImpl implements IWantService {
    @Resource
    private WantMapper wantMapper;

    @Override
    public void create(Want want) {
        wantMapper.create(want);
    }

    @Override
    public List<Want> listAll(Integer questionId) {
        return wantMapper.listAll(questionId);
    }
}
